package com.linewow.xhyy.nihaonew.activity.account;

import android.support.v7.widget.Toolbar;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.linewow.xhyy.nihaonew.R;
import com.linewow.xhyy.nihaonew.application.NiHaoApp;
import com.linewow.xhyy.nihaonew.base.BaseActivity;
import com.linewow.xhyy.nihaonew.model.HttpModel;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by LXR on 2016/11/11.
 */
public class ProtocolActivity extends BaseActivity {
    @Bind(R.id.toolbar_back_title)
    TextView toolbarBackTitle;
    @Bind(R.id.toolbar_back_left)
    ImageView toolbarBackLeft;
    @Bind(R.id.toolbar_back_right_tv)
    TextView toolbarBackRightTv;
    @Bind(R.id.toolbar_back_toolbar)
    Toolbar toolbarBackToolbar;
    @Bind(R.id.protocol_web)
    WebView protocolWeb;
    private String TAG = "ProtocolActivity";

    @Override
    public void initView() {
        super.initView();
        setContentView(R.layout.activity_protocol);
        ButterKnife.bind(this);
        toolbarBackTitle.setText(getString(R.string.title_protocol));
        protocolWeb.getSettings().setJavaScriptEnabled(true);
        if(NiHaoApp.EnglishFlag){
            protocolWeb.loadUrl(HttpModel.HOMEPROTOCOL+"en");
        }else{
            protocolWeb.loadUrl(HttpModel.HOMEPROTOCOL);
        }
    }
    @OnClick(R.id.toolbar_back_left)
    public void onClick() {
        finish();
    }
}
